<%@include file="menu/util.jsp" %>
<%@page contentType="text/html; charset=iso-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <fmt:bundle basename="app">
    <head>
        <title><fmt:message key="login.title.tag" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <jsp:include page="menu/header.jsp" />
        <%-- remember to name the variables the same as the attributes --%>
        <c:set var="pointer" value="${requestScope.pointer}" />
        <c:set var="dimensionalCuts" value="${requestScope.dimensionalCuts}" />
        <c:set var="cutMembers" value="${requestScope.cutMembers}"/>
        <c:set var="dataComparators" value="${requestScope.dataComparators}"/>
        <c:set var="comparators" value="${requestScope.comparators}"/>
    </head>
    <body>
       
         <%-- this is how you use an object properties with jstl --%>
         <c:out value="${pointer.name}" /><br />

        <c:forEach var="dimensionalCut" items="${dimensionalCuts}">
            <c:set var="cutMembersList" value="${cutMembers[dimensionalCut]}" />
            </br>
            <c:forEach var="member" items="${cutMembersList}">
                <c:out value="${member.name}" />
            </c:forEach>
        </c:forEach>
        </br>
        </br>
        <c:forEach var="dimensionalCut" items="${dimensionalCuts}">
            <c:set var="dataComparatorList" value="${dataComparators[dimensionalCut]}" />
            </br>
            <c:forEach var="dataComparator" items="${dataComparatorList}">
                <c:out value="${dataComparator.register}" />
            </c:forEach>
        </c:forEach>
        
        </br>
        </br>

        <table border="1">
            <tr>
                <td>
                    <c:out value="${pointer.name}" />
                </td>
                <c:forEach var="comparator" items="${comparators}">
                    <td><c:out value="${comparator.description}" /></td>
                </c:forEach>
            </tr>
            <c:forEach var="dimensionalCut" items="${dimensionalCuts}">
                    <tr>
                        <c:set var="cutMembersList" value="${cutMembers[dimensionalCut]}" />
                        <c:set var="dataComparatorList" value="${dataComparators[dimensionalCut]}" />
                        <td>
                            <c:forEach var="member" items="${cutMembersList}">
                                <c:out value="${member.name}" />
                            </c:forEach>
                        </td>
                        <c:forEach var="dataComparator" items="${dataComparatorList}">
                            <td><c:out default="N/A" value="${dataComparator.register}" /></td>
                        </c:forEach>

                    </tr>
            </c:forEach>

        </table>
        <c:forEach var="dimensionalCut" items="${dimensionalCuts}">
            <c:set var="dataComparatorList" value="${dataComparators[dimensionalCut]}" />
            <br />
            <c:forEach var="dataComparator" items="${dataComparatorList}">
                <c:out value="${dataComparator.register}" />
            </c:forEach>
        </c:forEach>

         
    </body>
    </fmt:bundle>
</html>
